package com.ruowei.modules.member.repository;


import com.ruowei.modules.member.domain.Question;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

/**
 * Spring Data  repository for the Question entity.
 */
@SuppressWarnings("unused")
@Repository
public interface QuestionRepository extends JpaRepository<Question, Long> {
    Optional<Question> findByQuestionCode(String questionCode);

    boolean existsByQuestionType(String type);

    Optional<Question> findByQuestion(String problem);

    boolean existsByQuestionAndQuestionCodeNot(String problem, String questionCode);
}
